<?php
namespace app\common\product\validate;


use think\Validate;

class StoreSupplierValidate extends Validate
{
    protected $rule = [
        "id"    => ["require", "gt:0"],
        "title" => ["require", "max:30"]
    ];

    protected $message = [
        "id.require" => "参数错误",
        "id.gt" => "参数错误",
        "title.require" => "请填写分类名称",
        "title.max" => "分类最长不能超过30字"
    ];

    protected $scene = [
        "create"    => ["title"],
        "edit"      => ["id", "title"],
        "delete"    => ["id"]
    ];
}